home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 002a / be310.zip / QUIT.CHS < prev    next >
Text File  |  1993-06-01  |  647b  |  26 lines

  1. /* CHESS FUNCTION(S): do_quit
  2. /*              DATE: 3/1/93
  3. /*            AUTHOR: C. Schanck
  4. /*
  5. /*       DESCRIPTION: this is a different version of 'quit' than Bingo 
  6. /* normally uses.  This one will ask you if you want to really quit and 
  7. /* lose your changes. If so, it will.
  8. do_quit
  9. {  
  10.    int i;       
  11.    char namebuf[80];
  12.    char askbuf[100];
  13.    if(ask("file_dirty")==0)
  14.       Quit();
  15.    
  16.    ask("file_path",namebuf);
  17.    i=strlen(namebuf);
  18.    ask("file_name",namebuf+i);
  19.             
  20.    sformat(askbuf,"Quit [%s] w/o Saving?",namebuf);
  21.    
  22.    i=get_yesno(askbuf,1);
  23.    if(i<=0)
  24.       return(0) 
  25.    return(Abort());
  26. }